home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb-4.5 / sun4.md / bfd / aoutf1.h < prev    next >
C/C++ Source or Header  |  1992-06-24  |  17KB  |  548 lines

  1. /* A.out "format 1" file handling code
  2.    Copyright (C) 1990-1991 Free Software Foundation, Inc.
  3.    Written by Cygnus Support.
  4.  
  5. This file is part of BFD, the Binary File Descriptor library.
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21. #include "bfd.h"
  22. #include "sysdep.h"
  23. #include "libbfd.h"
  24.  
  25. #include "aout/sun4.h"
  26. #include "libaout.h"           /* BFD a.out internal data structures */
  27.  
  28. #include "aout/aout64.h"
  29. #include "aout/stab_gnu.h"
  30. #include "aout/ar.h"
  31.  
  32. /*
  33. The file @code{aoutf1.h} contains the code for BFD's
  34. a.out back end. Control over the generated back end is given by these
  35. two preprocessor names:
  36. @table @code
  37. @item ARCH_SIZE
  38. This value should be either 32 or 64, depending upon the size of an
  39. int in the target format. It changes the sizes of the structs which
  40. perform the memory/disk mapping of structures.
  41.  
  42. The 64 bit backend may only be used if the host compiler supports 64
  43. ints (eg long long with gcc), by defining the name @code{HOST_64_BIT} in @code{bfd.h}.
  44. With this name defined, @emph{all} bfd operations are performed with 64bit
  45. arithmetic, not just those to a 64bit target.
  46.  
  47. @item TARGETNAME
  48. The name put into the target vector.
  49. @item
  50. @end table
  51.  
  52. */
  53.  
  54. void (*bfd_error_trap)();
  55.  
  56. /*SUPPRESS558*/
  57. /*SUPPRESS529*/
  58.  
  59. void
  60. DEFUN(NAME(sunos,set_arch_mach), (abfd, machtype),
  61.       bfd *abfd AND int machtype)
  62. {
  63.   /* Determine the architecture and machine type of the object file.  */
  64.   enum bfd_architecture arch;
  65.   long machine;
  66.   switch (machtype) {
  67.  
  68.   case M_UNKNOWN:
  69.       /* Some Sun3s make magic numbers without cpu types in them, so
  70.      we'll default to the 68020. */
  71.     arch = bfd_arch_m68k;
  72.     machine = 68020;
  73.     break;
  74.     
  75.   case M_68010:
  76.   case M_HP200:
  77.     arch = bfd_arch_m68k;
  78.     machine = 68010;
  79.     break;
  80.     
  81.   case M_68020:
  82.   case M_HP300:
  83.     arch = bfd_arch_m68k;
  84.     machine = 68020;
  85.     break;
  86.     
  87.   case M_SPARC:
  88.     arch = bfd_arch_sparc;
  89.     machine = 0;
  90.     break;
  91.     
  92.   case M_386:
  93.     arch = bfd_arch_i386;
  94.     machine = 0;
  95.     break;
  96.     
  97.   case M_29K:
  98.     arch = bfd_arch_a29k;
  99.     machine = 0;
  100.     break;
  101.     
  102.   case M_HPUX:
  103.     arch = bfd_arch_m68k;
  104.     machine = 0;
  105.     break;
  106.  
  107.   default:
  108.     arch = bfd_arch_obscure;
  109.     machine = 0;
  110.     break;
  111.   }
  112.   bfd_set_arch_mach(abfd, arch, machine);  
  113. }
  114.  
  115. #define SET_ARCH_MACH(ABFD, EXEC) \
  116.   NAME(sunos,set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \
  117.   choose_reloc_size(ABFD);
  118.  
  119. /* Determine the size of a relocation entry, based on the architecture */
  120. static void
  121. DEFUN(choose_reloc_size,(abfd),
  122. bfd *abfd)
  123. {
  124.   switch (bfd_get_arch(abfd)) {
  125.   case bfd_arch_sparc:
  126.   case bfd_arch_a29k:
  127.     obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
  128.     break;
  129.   default:
  130.     obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
  131.     break;
  132.   }
  133. }
  134.  
  135. /* Write an object file in SunOS format.
  136.   Section contents have already been written.  We write the
  137.   file header, symbols, and relocation.  */
  138.  
  139. static boolean
  140. DEFUN(NAME(aout,sunos4_write_object_contents),
  141.       (abfd),
  142.       bfd *abfd)
  143. {
  144.   bfd_size_type data_pad = 0;
  145.   struct external_exec exec_bytes;
  146.   struct internal_exec *execp = exec_hdr (abfd);
  147.     
  148.   execp->a_text = obj_textsec (abfd)->_raw_size;
  149.     
  150.   /* Magic number, maestro, please!  */
  151.   switch (bfd_get_arch(abfd)) {
  152.   case bfd_arch_m68k:
  153.     switch (bfd_get_mach(abfd)) {
  154.     case 68010:
  155.       N_SET_MACHTYPE(*execp, M_68010);
  156.       break;
  157.     default:
  158.     case 68020:
  159.       N_SET_MACHTYPE(*execp, M_68020);
  160.       break;
  161.     }
  162.     break;
  163.   case bfd_arch_sparc:
  164.     N_SET_MACHTYPE(*execp, M_SPARC);
  165.     break;
  166.   case bfd_arch_i386:
  167.     N_SET_MACHTYPE(*execp, M_386);
  168.     break;
  169.   case bfd_arch_a29k:
  170.     N_SET_MACHTYPE(*execp, M_29K);
  171.     break;
  172.   default:
  173.     N_SET_MACHTYPE(*execp, M_UNKNOWN);
  174.   }
  175.     
  176.   choose_reloc_size(abfd);
  177.     
  178.   /* FIXME */
  179.   N_SET_FLAGS (*execp, 0x1);
  180.     
  181.   WRITE_HEADERS(abfd, execp);
  182.  
  183.   return true;
  184. }
  185.  
  186. /* core files */
  187.  
  188. #define CORE_MAGIC 0x080456
  189. #define CORE_NAMELEN 16
  190.  
  191. /* The core structure is taken from the Sun documentation.
  192.   Unfortunately, they don't document the FPA structure, or at least I
  193.   can't find it easily.  Fortunately the core header contains its own
  194.   length.  So this shouldn't cause problems, except for c_ucode, which
  195.   so far we don't use but is easy to find with a little arithmetic. */
  196.  
  197. /* But the reg structure can be gotten from the SPARC processor handbook.
  198.   This really should be in a GNU include file though so that gdb can use
  199.   the same info. */
  200. struct regs {
  201.   int r_psr;
  202.   int r_pc;
  203.   int r_npc;
  204.   int r_y;
  205.   int r_g1;
  206.   int r_g2;
  207.   int r_g3;
  208.   int r_g4;
  209.   int r_g5;
  210.   int r_g6;
  211.   int r_g7;
  212.   int r_o0;
  213.   int r_o1;
  214.   int r_o2;
  215.   int r_o3;
  216.   int r_o4;
  217.   int r_o5;
  218.   int r_o6;
  219.   int r_o7;
  220. };
  221.  
  222. /* Taken from Sun documentation: */
  223.  
  224. /* FIXME:  It's worse than we expect.  This struct contains TWO substructs
  225.   neither of whose size we know, WITH STUFF IN BETWEEN THEM!  We can't
  226.   even portably access the stuff in between!  */
  227.  
  228. struct external_sparc_core {
  229.   int c_magic;            /* Corefile magic number */
  230.   int c_len;            /* Sizeof (struct core) */
  231. #define    SPARC_CORE_LEN    432
  232.   int c_regs[19];        /* General purpose registers -- MACHDEP SIZE */
  233.   struct external_exec c_aouthdr; /* A.out header */
  234.   int c_signo;              /* Killing signal, if any */
  235.   int c_tsize;              /* Text size (bytes) */
  236.   int c_dsize;              /* Data size (bytes) */
  237.   int c_ssize;              /* Stack size (bytes) */
  238.   char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
  239.   double fp_stuff[1];            /* external FPU state (size unknown by us) */
  240.   /* The type "double" is critical here, for alignment.
  241.     SunOS declares a struct here, but the struct's alignment
  242.       is double since it contains doubles.  */
  243.   int c_ucode;            /* Exception no. from u_code */
  244.   /* (this member is not accessible by name since we don't
  245.     portably know the size of fp_stuff.) */
  246. };
  247.  
  248. struct external_sun3_core {
  249.   int c_magic;            /* Corefile magic number */
  250.   int c_len;            /* Sizeof (struct core) */
  251. #define    SUN3_CORE_LEN    826    /* As of SunOS 4.1.1 */
  252.   int c_regs[18];        /* General purpose registers -- MACHDEP SIZE */
  253.   struct external_exec c_aouthdr;    /* A.out header */
  254.   int c_signo;            /* Killing signal, if any */
  255.   int c_tsize;            /* Text size (bytes) */
  256.   int c_dsize;            /* Data size (bytes) */
  257.   int c_ssize;            /* Stack size (bytes) */
  258.   char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
  259.   double fp_stuff[1];            /* external FPU state (size unknown by us) */
  260.   /* The type "double" is critical here, for alignment.
  261.     SunOS declares a struct here, but the struct's alignment
  262.       is double since it contains doubles.  */
  263.   int c_ucode;            /* Exception no. from u_code */
  264.   /* (this member is not accessible by name since we don't
  265.     portably know the size of fp_stuff.) */
  266. };
  267.  
  268. struct internal_sunos_core {
  269.   int c_magic;            /* Corefile magic number */
  270.   int c_len;            /* Sizeof (struct core) */
  271.   long c_regs_pos;        /* file offset of General purpose registers */
  272.   int c_regs_size;        /* size of General purpose registers */
  273.   struct internal_exec c_aouthdr; /* A.out header */
  274.   int c_signo;              /* Killing signal, if any */
  275.   int c_tsize;              /* Text size (bytes) */
  276.   int c_dsize;              /* Data size (bytes) */
  277.   int c_ssize;              /* Stack size (bytes) */
  278.   long c_stacktop;          /* Stack top (address) */
  279.   char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
  280.   long fp_stuff_pos;        /* file offset of external FPU state (regs) */
  281.   int fp_stuff_size;        /* Size of it */
  282.   int c_ucode;            /* Exception no. from u_code */
  283. };
  284.  
  285. /* byte-swap in the Sun-3 core structure */
  286. static void
  287. DEFUN(swapcore_sun3,(abfd, ext, intcore),
  288.       bfd *abfd AND
  289.       char *ext AND
  290.       struct internal_sunos_core *intcore)
  291. {
  292.   struct external_sun3_core *extcore = (struct external_sun3_core *)ext;
  293.  
  294.   intcore->c_magic = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_magic);
  295.   intcore->c_len   = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_len  );
  296.   intcore->c_regs_pos  = (long) (((struct external_sun3_core *)0)->c_regs);
  297.   intcore->c_regs_size = sizeof (extcore->c_regs);
  298.   NAME(aout,swap_exec_header_in)(abfd, &extcore->c_aouthdr,&intcore->c_aouthdr);
  299.   intcore->c_signo = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_signo);
  300.   intcore->c_tsize = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_tsize);
  301.   intcore->c_dsize = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_dsize);
  302.   intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_ssize);
  303.   memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
  304.   intcore->fp_stuff_pos = (long) (((struct external_sun3_core *)0)->fp_stuff);
  305.   /* FP stuff takes up whole rest of struct, except c_ucode. */
  306.   intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
  307.     (file_ptr)(((struct external_sun3_core *)0)->fp_stuff);
  308.   /* Ucode is the last thing in the struct -- just before the end */
  309.   intcore->c_ucode = 
  310.     bfd_h_get_32 (abfd, 
  311.           intcore->c_len - sizeof (extcore->c_ucode) + (unsigned char *)extcore);
  312.   intcore->c_stacktop = 0x0E000000; /* By experimentation */
  313. }
  314.  
  315.  
  316. /* byte-swap in the Sparc core structure */
  317. static void
  318. DEFUN(swapcore_sparc,(abfd, ext, intcore),
  319.       bfd *abfd AND
  320.       char *ext AND
  321.       struct internal_sunos_core *intcore)
  322. {
  323.   struct external_sparc_core *extcore = (struct external_sparc_core *)ext;
  324.   
  325.   intcore->c_magic = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_magic);
  326.   intcore->c_len   = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_len  );
  327.   intcore->c_regs_pos  = (long) (((struct external_sparc_core *)0)->c_regs);
  328.   intcore->c_regs_size = sizeof (extcore->c_regs);
  329.   NAME(aout,swap_exec_header_in)(abfd, &extcore->c_aouthdr,&intcore->c_aouthdr);
  330.   intcore->c_signo = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_signo);
  331.   intcore->c_tsize = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_tsize);
  332.   intcore->c_dsize = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_dsize);
  333.   intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *)&extcore->c_ssize);
  334.   memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
  335.   intcore->fp_stuff_pos = (long) (((struct external_sparc_core *)0)->fp_stuff);
  336.   /* FP stuff takes up whole rest of struct, except c_ucode. */
  337.   intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
  338.     (file_ptr)(((struct external_sparc_core *)0)->fp_stuff);
  339.   /* Ucode is the last thing in the struct -- just before the end */
  340.   intcore->c_ucode =
  341.     bfd_h_get_32 (abfd, 
  342.           intcore->c_len - sizeof (extcore->c_ucode) + (unsigned char *)extcore);
  343.   /* Supposedly the user stack grows downward from the bottom of kernel memory.
  344.      Presuming that this remains true, this definition will work. */
  345. #ifdef sprite
  346. #define SPARC_USRSTACK (503316480)
  347. #else
  348. #define SPARC_USRSTACK (-(128*1024*1024))
  349. #endif
  350.   intcore->c_stacktop = SPARC_USRSTACK;    /* By experimentation */
  351. }
  352.  
  353. /* need this cast because ptr is really void * */
  354. #define core_hdr(bfd) ((bfd)->tdata.sun_core_data)
  355. #define core_datasec(bfd) (core_hdr(bfd)->data_section)
  356. #define core_stacksec(bfd) (core_hdr(bfd)->stack_section)
  357. #define core_regsec(bfd) (core_hdr(bfd)->reg_section)
  358. #define core_reg2sec(bfd) (core_hdr(bfd)->reg2_section)
  359.  
  360. /* These are stored in the bfd's tdata */
  361. struct sun_core_struct {
  362.   struct internal_sunos_core *hdr;             /* core file header */
  363.   asection *data_section;
  364.   asection *stack_section;
  365.   asection *reg_section;
  366.   asection *reg2_section;
  367. };
  368.  
  369. static bfd_target *
  370. DEFUN(sunos4_core_file_p,(abfd),
  371.       bfd *abfd)
  372. {
  373.   unsigned char longbuf[4];    /* Raw bytes of various header fields */
  374.   int core_size;
  375.   int core_mag;
  376.   struct internal_sunos_core *core;
  377.   char *extcore;
  378.   struct mergem {
  379.     struct sun_core_struct suncoredata;
  380.     struct internal_sunos_core internal_sunos_core;
  381.     char external_core[1];
  382.   } *mergem;
  383.   
  384.   bfd_error = system_call_error;
  385.   
  386.   if (bfd_read ((PTR)longbuf, 1, sizeof (longbuf), abfd) !=
  387.       sizeof (longbuf))
  388.     return 0;
  389.   core_mag = bfd_h_get_32 (abfd, longbuf);
  390.  
  391.   if (core_mag != CORE_MAGIC) return 0;
  392.  
  393.   /* SunOS core headers can vary in length; second word is size; */
  394.   if (bfd_read ((PTR)longbuf, 1, sizeof (longbuf), abfd) !=
  395.       sizeof (longbuf))
  396.     return 0;
  397.   core_size = bfd_h_get_32 (abfd, longbuf);
  398.   /* Sanity check */
  399.   if (core_size > 20000)
  400.     return 0;
  401.  
  402.   if (bfd_seek (abfd, 0L, false) < 0) return 0;
  403.  
  404.   mergem = (struct mergem *)bfd_zalloc (abfd, core_size + sizeof (struct mergem));
  405.   if (mergem == NULL) {
  406.     bfd_error = no_memory;
  407.     return 0;
  408.   }
  409.  
  410.   extcore = mergem->external_core;
  411.  
  412.   if ((bfd_read ((PTR) extcore, 1, core_size, abfd)) != core_size) {
  413.     bfd_error = system_call_error;
  414.     bfd_release (abfd, (char *)mergem);
  415.     return 0;
  416.   }
  417.  
  418.   /* Validate that it's a core file we know how to handle, due to sun
  419.      botching the positioning of registers and other fields in a machine
  420.      dependent way.  */
  421.   core = &mergem->internal_sunos_core;
  422.   switch (core_size) {
  423.   case SPARC_CORE_LEN:
  424.     swapcore_sparc (abfd, extcore, core);
  425.     break;
  426.   case SUN3_CORE_LEN:
  427.     swapcore_sun3 (abfd, extcore, core);
  428.     break;
  429.   default:
  430.     bfd_error = system_call_error;        /* FIXME */
  431.     bfd_release (abfd, (char *)mergem);
  432.     return 0;
  433.   }
  434.  
  435.  abfd->tdata.sun_core_data = &mergem->suncoredata;
  436.  abfd->tdata.sun_core_data->hdr = core;
  437.  
  438.   /* create the sections.  This is raunchy, but bfd_close wants to reclaim
  439.      them */
  440.   core_stacksec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
  441.   if (core_stacksec (abfd) == NULL) {
  442.   loser:
  443.     bfd_error = no_memory;
  444.     bfd_release (abfd, (char *)mergem);
  445.     return 0;
  446.   }
  447.   core_datasec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
  448.   if (core_datasec (abfd) == NULL) {
  449.   loser1:
  450.     bfd_release (abfd, core_stacksec (abfd));
  451.     goto loser;
  452.   }
  453.   core_regsec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
  454.   if (core_regsec (abfd) == NULL) {
  455.   loser2:
  456.     bfd_release (abfd, core_datasec (abfd));
  457.     goto loser1;
  458.   }
  459.   core_reg2sec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
  460.   if (core_reg2sec (abfd) == NULL) {
  461.     bfd_release (abfd, core_regsec (abfd));
  462.     goto loser2;
  463.   }
  464.  
  465.   core_stacksec (abfd)->name = ".stack";
  466.   core_datasec (abfd)->name = ".data";
  467.   core_regsec (abfd)->name = ".reg";
  468.   core_reg2sec (abfd)->name = ".reg2";
  469.  
  470.   core_stacksec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
  471.   core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
  472.   core_regsec (abfd)->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
  473.   core_reg2sec (abfd)->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
  474.  
  475.   core_stacksec (abfd)->_raw_size = core->c_ssize;
  476.   core_datasec (abfd)->_raw_size = core->c_dsize;
  477.   core_regsec (abfd)->_raw_size = core->c_regs_size;
  478.   core_reg2sec (abfd)->_raw_size = core->fp_stuff_size;
  479.  
  480.   core_stacksec (abfd)->vma = (core->c_stacktop - core->c_ssize);
  481.   core_datasec (abfd)->vma = N_DATADDR(core->c_aouthdr);
  482.   core_regsec (abfd)->vma = 0;
  483.   core_reg2sec (abfd)->vma = 0;
  484.  
  485.   core_stacksec (abfd)->filepos = core->c_len + core->c_dsize;
  486.   core_datasec (abfd)->filepos = core->c_len;
  487.   /* We'll access the regs afresh in the core file, like any section: */
  488.   core_regsec (abfd)->filepos = (file_ptr)core->c_regs_pos;
  489.   core_reg2sec (abfd)->filepos = (file_ptr)core->fp_stuff_pos;
  490.  
  491.   /* Align to word at least */
  492.   core_stacksec (abfd)->alignment_power = 2;
  493.   core_datasec (abfd)->alignment_power = 2;
  494.   core_regsec (abfd)->alignment_power = 2;
  495.   core_reg2sec (abfd)->alignment_power = 2;
  496.  
  497.   abfd->sections = core_stacksec (abfd);
  498.   core_stacksec (abfd)->next = core_datasec (abfd);
  499.   core_datasec (abfd)->next = core_regsec (abfd);
  500.   core_regsec (abfd)->next = core_reg2sec (abfd);
  501.  
  502.   abfd->section_count = 4;
  503.  
  504.   return abfd->xvec;
  505. }
  506.  
  507. static char *sunos4_core_file_failing_command (abfd)
  508. bfd *abfd;
  509.   {
  510.   return core_hdr (abfd)->hdr->c_cmdname;
  511. }
  512.  
  513. static int
  514. DEFUN(sunos4_core_file_failing_signal,(abfd),
  515.       bfd *abfd)
  516. {
  517.   return core_hdr (abfd)->hdr->c_signo;
  518. }
  519.  
  520. static boolean
  521. DEFUN(sunos4_core_file_matches_executable_p, (core_bfd, exec_bfd),
  522.       bfd *core_bfd AND
  523.       bfd *exec_bfd)
  524. {
  525.   if (core_bfd->xvec != exec_bfd->xvec) {
  526.     bfd_error = system_call_error;
  527.     return false;
  528.   }
  529.  
  530.   return (memcmp ((char *)&((core_hdr (core_bfd)->hdr)->c_aouthdr), 
  531.           (char *) exec_hdr (exec_bfd),
  532.           sizeof (struct internal_exec)) == 0) ? true : false;
  533. }
  534.  
  535. #define    MY_core_file_failing_command     sunos4_core_file_failing_command
  536. #define    MY_core_file_failing_signal    sunos4_core_file_failing_signal
  537. #define    MY_core_file_matches_executable_p sunos4_core_file_matches_executable_p
  538.  
  539. #define MY_bfd_debug_info_start        bfd_void
  540. #define MY_bfd_debug_info_end        bfd_void
  541. #define MY_bfd_debug_info_accumulate    (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
  542. #define MY_core_file_p sunos4_core_file_p
  543. #define MY_write_object_contents NAME(aout,sunos4_write_object_contents)
  544.  
  545. #define TARGET_IS_BIG_ENDIAN_P
  546.  
  547. #include "aout-target.h"
  548.